/**
 *  页面功能：添加试驾或购车订单后台跳转
 *  建立者 : 王钰苏
 *  建立日期：2019/5/29 21:07
 *  咨询邮件：1730797947@qq.com
 */
// 新增试驾或购车订单的后台跳转
$(".showMyMess .onMess input[type=button]").click(function(){
	$.ajax({
		type:"post",
		url:"addnewOrder",
		data:{
			"userName":$(".showMyMess .onMess input")[0].value,
			"carName":$(".showMyMess .onMess input")[1].value,
			"carMoney":$(".showMyMess .onMess input")[2].value,
			"carNum":$(".showMyMess .onMess input")[3].value,
			"carColor":$(".showMyMess .onMess input")[4].value,
			"orderType":$(".showMyMess .onMess select")[0].value,
			"payState":$(".showMyMess .onMess select")[1].value,
		},
		dataTye:"json",
		async:true,
		success:function(data){
			alert(data.result);
			window.location.href="newCarOrder";
		},
		error:function(){
			console.log("订单生成失败");
		}
	});
});
	